import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2023-11-10
 * Time: 8:55
 */
public class XmlAdvice {
    public void afterAccelerate() {
        System.out.println("车辆加速，前车注意，我即将超车,(基于xml)");
    }

    public void afterDecelerate() {
        System.out.println("车辆减速，后车注意减速,(基于xml)");
    }

    public Object around(ProceedingJoinPoint point) throws Throwable {
        System.out.println("即将刹车，后车注意减速(基于xml)");
        Object object = point.proceed();
        System.out.println("司机注意车辆已静止,(基于xml)");
        return object;
    }

}
